<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<%=basePath%>front/css/bootstrap.css" rel="stylesheet"
	type="text/css" media="all" />
<link href="<%=basePath%>front/css/component.css" rel="stylesheet"
	type="text/css" media="all" />
<link href="<%=basePath%>front/css/style_grid.css" rel="stylesheet"
	type="text/css" media="all" />
<link href="<%=basePath%>front/css/style.css" rel="stylesheet"
	type="text/css" media="all" />
<!-- font-awesome-icons -->
<link href="<%=basePath%>front/css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome-icons -->
<link
	href="http://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800"
	rel="stylesheet">
</head>
<body>
<jsp:include page="top.jsp"></jsp:include>
	<!-- banner -->
	<div class="wthree_agile_admin_info">
		<!-- /w3_agileits_top_nav-->
		<!-- /nav-->

		<div class="clearfix"></div>
		<!-- //w3_agileits_top_nav-->

		<!-- /inner_content-->
		<div class="inner_content">
			<!-- /inner_content_w3_agile_info-->

			<!-- breadcrumbs -->

			<!-- //breadcrumbs -->

			<div class="inner_content_w3_agile_info two_in">
				<h2 class="w3_inner_tittle">充值</h2>

				<!--/forms-->
				<div class="forms-main_agileits">



					<!--/forms-inner-->
					<div class="forms-inner">
						<!--/set-1-->
						<div class="set-1_w3ls">

							<div class="col-md-6 button_set_one agile_info_shadow graph-form">
								<h3 class="w3_inner_tittle two">为你的账户充值</h3>
								<div class="grid-1">
									<div class="form-body">
										<form class="form-horizontal">
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-2 control-label">金额</label>
												<div class="col-sm-9">
													<input type="number" class="form-control" id="money"
														placeholder="充值金额">
												</div>
											</div>
											<div class="form-group">
												<label for="inputPassword3" class="col-sm-2 control-label">密码</label>
												<div class="col-sm-9">
													<input type="password" class="form-control"
														id="password" placeholder="Password">
												</div>
											</div>
											<div class="form-group">
												<div class="col-sm-offset-2 col-sm-10">
													
												</div>
											</div>
											<div class="col-sm-offset-2">
												<button onclick="addmoney();" class="btn btn-default">充值</button>
											</div>
										</form>
									</div>

								</div>
							</div>


						</div>
						<div class="clearfix"></div>

					</div>
					<!-- //social_media-->
				</div>
				<!-- //inner_content_w3_agile_info-->
			</div>
			<!-- //inner_content-->
		</div>
		<!-- banner -->
		<!--copy rights start here-->

		<!--copy rights end here-->
		<!-- js -->

		<script type="text/javascript"
			src="<%=basePath%>front/js/jquery-2.1.4.min.js"></script>
		<script src="<%=basePath%>front/js/modernizr.custom.js"></script>

		<script src="<%=basePath%>front/js/classie.js"></script>
		<script src="<%=basePath%>front/js/gnmenu.js"></script>
		

		<!-- //js -->
		<script src="<%=basePath%>front/js/screenfull.js"></script>
		
		<script src="<%=basePath%>front/js/jquery.nicescroll.js"></script>
		<script src="<%=basePath%>front/js/scripts.js"></script>

		<script type="text/javascript" src="<%=basePath%>front/js/bootstrap-3.1.1.min.js"></script>
</body>
<script>
function addmoney(){
	debugger;
	
	var money=document.getElementById("money").value;
	var password=document.getElementById("password").value;
	
	
	$.ajax( {
		url:'<%=basePath %>puser/addMoney',
			async: false,
			type : 'post',
			data : {
				money : money,
				password : password
			},
			datatype : "text",//"xml", "html", "script", "json", "jsonp", "text".           
			success : function(data) {

				if (data!=200) {
					alert("密码错误！");
				}else{
					alert("充值成功！");
				} 

			},
			error : function() {
				alert("异常！");
			}
		});

	
}
</script>
</html>